﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Entity;

public partial class fortest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    /// <summary>
    /// 局
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button2_Click(object sender, EventArgs e)
    {
        Perm p = new Perm();
        p.UserType = Convert.ToInt32(UserType.Text);
        p.UID = Convert.ToInt32(UID.Text);
        p.UserName = (UserName.Text);
        p.UName = (WorkCode.Text);

        p.SchoolAreaId = Convert.ToInt32(SchoolAreaId.Text);
        p.SchoolAreaName = (SchoolAreaName.Text);
        p.SchoolMark = schoolid.Text;
        p.SchoolName = (SchoolName.Text);
        p.DataUserName = (SchoolMark.Text);
        p.Edu_Exam = Convert.ToBoolean(Convert.ToInt32( Edu_Exam.Text));
        p.Edu_Report = Convert.ToBoolean(Convert.ToInt32( Edu_Report.Text));
        p.School_Tech_EvalSet = Convert.ToBoolean(Convert.ToInt32( School_Tech_EvalSet.Text));
        p.School_Tech_Report = Convert.ToBoolean(Convert.ToInt32( School_Tech_Report.Text));
        p.School_Score_EduExam = Convert.ToBoolean(Convert.ToInt32( School_Score_EduExam.Text));
        p.School_Score_SchoolExam = Convert.ToBoolean(Convert.ToInt32( School_Score_SchoolExam.Text));
        p.School_Score_Report = Convert.ToBoolean(Convert.ToInt32(School_Score_Report.Text));

        Session["UserInfo"] = p;

        this.Response.Redirect("Education/Default.aspx");
    }
    /// <summary>
    /// 校
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button3_Click(object sender, EventArgs e)
    {
        Perm p = new Perm();
        p.UserType = Convert.ToInt32(UserType.Text);
        p.UID = Convert.ToInt32(UID.Text);
        p.UserName = (UserName.Text);
        p.UName = (WorkCode.Text);

        p.SchoolAreaId = Convert.ToInt32(SchoolAreaId.Text);
        p.SchoolAreaName = (SchoolAreaName.Text);

        p.SchoolMark = schoolid.Text;
        p.SchoolName = (SchoolName.Text);
        p.DataUserName = (SchoolMark.Text);

        p.Edu_Exam = Convert.ToBoolean(Convert.ToInt32(Edu_Exam.Text));
        p.Edu_Report = Convert.ToBoolean(Convert.ToInt32(Edu_Report.Text));
        p.School_Tech_EvalSet = Convert.ToBoolean(Convert.ToInt32(School_Tech_EvalSet.Text));
        p.School_Tech_Report = Convert.ToBoolean(Convert.ToInt32(School_Tech_Report.Text));
        p.School_Score_EduExam = Convert.ToBoolean(Convert.ToInt32(School_Score_EduExam.Text));
        p.School_Score_SchoolExam = Convert.ToBoolean(Convert.ToInt32(School_Score_SchoolExam.Text));
        p.School_Score_Report = Convert.ToBoolean(Convert.ToInt32(School_Score_Report.Text));

        Session["UserInfo"] = p;

        this.Response.Redirect("School/Default.aspx");
    }
    /// <summary>
    /// 学生
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        Perm p = new Perm();
        p.UserType = Convert.ToInt32(UserType.Text);
        p.UID = Convert.ToInt32(UID.Text);
        p.UserName = (UserName.Text);
        p.UName = (WorkCode.Text);

        p.SchoolAreaId = Convert.ToInt32(SchoolAreaId.Text);
        p.SchoolAreaName = (SchoolAreaName.Text);

        p.SchoolMark = schoolid.Text;
        p.SchoolName = (SchoolName.Text);
        p.DataUserName = (SchoolMark.Text);

        p.Edu_Exam = Convert.ToBoolean(Convert.ToInt32(Edu_Exam.Text));
        p.Edu_Report = Convert.ToBoolean(Convert.ToInt32(Edu_Report.Text));
        p.School_Tech_EvalSet = Convert.ToBoolean(Convert.ToInt32(School_Tech_EvalSet.Text));
        p.School_Tech_Report = Convert.ToBoolean(Convert.ToInt32(School_Tech_Report.Text));
        p.School_Score_EduExam = Convert.ToBoolean(Convert.ToInt32(School_Score_EduExam.Text));
        p.School_Score_SchoolExam = Convert.ToBoolean(Convert.ToInt32(School_Score_SchoolExam.Text));
        p.School_Score_Report = Convert.ToBoolean(Convert.ToInt32(School_Score_Report.Text));

        Session["UserInfo"] = p;

        this.Response.Redirect("Student/Default.aspx");
    }
}
